﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;



using Meqs.Entity;
using Meqs.Logic.Interface;

namespace Meqs.Logic.Implement
{
    public class StuCausePersonTypeCatchLogic : CommonLogic<StuCausePersonTypeCatch, int>, IStuCausePersonTypeCatchLogic
    {
        #region Implementation of ICommonLogic<StuCausePersonTypeCatch, int>

        /// <sammury>
        /// 创建对象
        /// </sammury>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Create(StuCausePersonTypeCatch entity)
        {
            return CreateObject(entity);
        }

        /// <sammury>
        /// 更新对象
        /// </sammury>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Update(StuCausePersonTypeCatch entity)
        {
            return UpdateObject(entity);
        }

        /// <summary>
        /// 删除对象
        /// </summary>
        /// <param name="entityId"></param>
        /// <returns></returns>
        public int Delete(int entityId)
        {
            return DeleteObject(entityId);
        }

        /// <summary>
        /// 删除所有对象
        /// </summary>
        /// <returns></returns>
        public int DeleteAll()
        {
            return DeleteAllObject();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entityId"></param>
        /// <returns></returns>
        public StuCausePersonTypeCatch FindById(int entityId)
        {
            return FindObjectById(entityId);
        }

        /// <summary>
        /// 检索对象数量
        /// </summary>
        /// <returns></returns>
        public int FindCount()
        {
            return FindObjectByCount();
        }

        /// <sammury>
        /// 检索对象
        /// </sammury>
        public IList<StuCausePersonTypeCatch> FindAll()
        {
            return FindAllObject();
        }

        /// <summary>
        /// 检索对象数量
        /// </summary>
        /// <returns></returns>
        public int FindCount(Hashtable table)
        {
            return FindObjectByCount(table);
        }

        /// <sammury>
        /// 检索对象
        /// </sammury>
        public IList<StuCausePersonTypeCatch> FindAll(Hashtable table)
        {
            return FindObject(table);
        }

        #endregion

        #region Implementation of IStuCausePersonTypeCatchLogic

        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="mpic"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        public int InsertStuCausePersonTypeCatch(StuCausePersonTypeCatch mpic, string schoolMark)
        {
            Hashtable ht = new Hashtable();
            ht.Add("StuCausePersonTypeCatch", mpic);
            ht.Add("SchoolMark", schoolMark);
            return (int)InsertCustomer("StuCausePersonTypeCatch.InsertStuCausePersonTypeCatch", ht);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="studentID"></param>
        /// <param name="recordID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        public int DeleteStuCausePersonTypeCatch(int studentID, int recordID, string schoolMark)
        {
            Hashtable ht = new Hashtable();
            ht.Add("StudentID", studentID);
            ht.Add("RecordID", recordID);
            ht.Add("SchoolMark", schoolMark);
            return DeleteCustomer("StuCausePersonTypeCatch.DeleteStuCausePersonTypeCatch", ht);
        }

        #endregion
    }
}